package cn.pomelo;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Demo {

    public static void main(String[] args) {
        Long start = System.currentTimeMillis();
        System.out.println("开始运行");
        FileInputStream fis = null;
//        BufferedInputStream bis = null;
//        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            fis = new FileInputStream("D:\\tmp\\test\\all.csv");
//            bis = new BufferedInputStream(fis);
            byte[] buf = new byte[fis.available()];
//            int len;
            fis.read(buf);
//            System.out.println(new String(buf, StandardCharsets.UTF_8));
//            while ((len = bis.read(buf)) != -1) {
//
////                baos.write(buf);
////                System.out.println(baos.toString());
//            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
//                bis.close();
                fis.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        Long end = System.currentTimeMillis();
        System.out.println("花费时间为：" + (end-start) +"ms");

    }
}
